package com.hack4jp.hackearthquakes;

import java.util.HashMap;
import android.graphics.Bitmap;

public class ImageCache {

	private static HashMap<String, Bitmap> _cache = new HashMap<String,Bitmap>();
	
	public static void setImage(String key, Bitmap image) {
        _cache.put(key, image);
    }
	
	public static Bitmap getImage(String key) {
        if (!_cache.containsKey(key)) {
            return null;
        }

        return _cache.get(key);
    }
	
	public static void clearCache(){
        _cache.clear();
    }
}
